package vip.liux.backend.domain.models.gen;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import vip.liux.backend.infrastructure.constants.GenConst;
import vip.liux.domain.entities.auditing.AuditedEntity;

@Getter
@Setter
@Entity
@Table(name = "gen_table")
public class GenTable extends AuditedEntity<Long> {
    /**
     * 表名称
     */
    @Column(name = "table_name", nullable = false)
    private String tableName;

    /**
     * 表描述
     */
    @Column(name = "table_comment")
    private String tableComment;

    /**
     * 实体类名称
     */
    @Column(name = "class_name")
    private String className;

    /**
     * 生成包路径
     */
    @Column(name = "package_name")
    private String packageName;

    /**
     * 生成模块名
     */
    @Column(name = "module_name")
    private String moduleName;

    /**
     * 生成代码方式(0:zip压缩包 1:自定义路径)
     */
    @Enumerated(EnumType.ORDINAL)
    @Column(name = "gen_type")
    private GenConst.GenType genType;

    /**
     * 生成路径(不填默认项目路径)
     */
    @Column(name = "gen_path")
    private String genPath;

    /**
     * 其它生成选项
     */
    @Column(name = "options")
    private String options;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;
}